This command is used to manage window manager protocols such as
WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW. _N_a_m_e is the name of an atom corresponding to a
window manager protocol, such as WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW or
WWWWMMMM____SSSSAAAAVVVVEEEE____YYYYOOOOUUUURRRRSSSSEEEELLLLFFFF or WWWWMMMM____TTTTAAAAKKKKEEEE____FFFFOOOOCCCCUUUUSSSS. If both _n_a_m_e and _c_o_m_m_a_n_d are
specified, then _c_o_m_m_a_n_d is associated with the protocol specified by
_n_a_m_e. _N_a_m_e will be added to _w_i_n_d_o_w's WWWWMMMM____PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLLSSSS property to tell
the window manager that the application has a protocol handler for
_n_a_m_e, and _c_o_m_m_a_n_d will be invoked in the future whenever the window
manager sends a message to the client for that protocol. In this
case the command returns an empty string. If _n_a_m_e is specified but
_c_o_m_m_a_n_d isn't, then the current command for _n_a_m_e is returned, or an
empty string if there is no handler defined for _n_a_m_e. If _c_o_m_m_a_n_d is
specified as an empty string then the current handler for _n_a_m_e is
deleted and it is removed from the WWWWMMMM____PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLLSSSS property on _w_i_n_d_o_w;
an empty string is returned. Lastly, if neither _n_a_m_e nor _c_o_m_m_a_n_d is
specified, the command returns a list of all the protocols for which
handlers are currently defined for _w_i_n_d_o_w.
Tk always defines a protocol handler for WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW, even if
you haven't asked for one with wwwwmmmm pppprrrroooottttooooccccoooollll. If a WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW
message arrives when you haven't defined a handler, then Tk handles
the message by destroying the window for which it was received.
Gridded geometry management occurs when one of the widgets of an
application supports a range of useful sizes. This occurs, for example,
in a text editor where the scrollbars, menus, and other adornments are
fixed in size but the edit widget can support any number of lines of text
or characters per line. In this case, it is usually desirable to let the
user specify the number of lines or characters-per-line, either with the
wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy command or by interactively resizing the window. In the case
of text, and in other interesting cases also, only discrete sizes of the
window make sense, such as integral numbers of lines and characters-per-
line; arbitrary pixel sizes are not useful.
Gridded geometry management provides support for this kind of
application. Tk (and the window manager) assume that there is a grid of
some sort within the application and that the application should be
resized in terms of _g_r_i_d _u_n_i_t_s rather than pixels. Gridded geometry
management is typically invoked by turning on the sssseeeettttGGGGrrrriiiidddd option for a
widget; it can also be invoked with the wwwwmmmm ggggrrrriiiidddd command or by calling
TTTTkkkk____SSSSeeeettttGGGGrrrriiiidddd. In each of these approaches the particular widget (or
sometimes code in the application as a whole) specifies the relationship
between integral grid sizes for the window and pixel sizes. To return to
non-gridded geometry management, invoke wwwwmmmm ggggrrrriiiidddd with empty argument
strings.
When gridded geometry management is enabled then all the dimensions |
specified in wwwwmmmm mmmmiiiinnnnssssiiiizzzzeeee, wwwwmmmm mmmmaaaaxxxxssssiiiizzzzeeee, and wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy commands are treated|
as grid units rather than pixel units. Interactive resizing is also |
carried out in even numbers of grid units rather than pixels.
BBBBUUUUGGGGSSSS
Most existing window managers appear to have bugs that affect the
operation of the wwwwmmmm command. For example, some changes won't take effect
if the window is already active: the window will have to be withdrawn
and de-iconified in order to make the change happen.